<h1>New employee</h1>

<% form_for(@employee) do |f| %>
  <%= f.error_messages %>
  <p>
    <%= f.label :warehouse_id %><br />
    <%= f.select(:warehouse_id, Warehouse.find(:all).collect {|w| [ w.name, w.id ] }, { :include_blank => true }) %>
  </p>
  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :surname %><br />
    <%= f.text_field :surname %>
  </p>
  <p>
    <%= f.label :address %><br />
    <%= f.text_field :address %>
  </p>
  <p>
    <%= f.label :login %><br />
    <%= f.text_field :login %>
  </p>
  <p>
    <%= f.label :password %><br />
    <%= f.password_field :password, :value => ''%>
  </p>
  <p>
    <%= f.label :password_confirmation%><br />
    <%= f.password_field :password_confirmation %>
  </p>
  
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'List', employees_path %>
